const urlmovie='https://m.douban.com/rexxar/api/v2/subject_collection/movie_showing/items?count=5';
const urltv='https://m.douban.com/rexxar/api/v2/subject_collection/tv_hot/items?count=5';
const urlzy='https://m.douban.com/rexxar/api/v2/subject_collection/tv_variety_show/items?count=5';
Page({
  data:{
    title:'',
  },
  input(e){
    console.log(e)
    this.setData({
      title:e.detail.value
    })
  },
  search(e){
    wx.navigateTo({
      url:'search?title='+this.data.title,
    })
  },
  onLoad(){
    wx.request({
      url: urlmovie,
      success:res=>{
        console.log(res);
        this.setData({
          movie:res.data.subject_collection_items
        })
      }
    })
    wx.request({
      url: urltv,
      success:res=>{
        console.log(res);
        this.setData({
          tv:res.data.subject_collection_items
        })
      }
    })
    wx.request({
      url: urlzy,
      success:res=>{
        console.log(res);
        this.setData({
          zy:res.data.subject_collection_items
        })
      }
    })
  }
})